import http from './public'
// 登陆
export const userLogin = (params) => {
  return http.fetchPost('/base/login', params)
}
// 登陆2
export const userLogin2 = (params) => {
  return http.fetchPost('/base/login', params)
}
// 退出登陆
export const loginOut = (params) => {
  return http.fetchPost('/users/loginOut', params)
}
// 用户信息
export const userInfo = (params) => {
  return http.fetchGet('/client/Members', params)
}
// 注册账号
export const register = (params) => {
  return http.fetchPost('/base/signUp', params)
}
// 上传图片
export const upload = (params) => {
  return http.fetchPost('/admin/upload/base64', params)
}
// 修改头像
export const updateheadimage = (Id, params) => {
  return http.fetchPut('/client/Members/'+Id, params)
}
// 首页接口
export const productHome = (params) => {
  return http.fetchGet('/goods/productHome', params)
}
// 首页接口2
export const productHome2 = (params) => {
  return http.fetchGet('/Client/Categories', params)
}
// 首页所有商品
export const productHome3 = (params) => {
  return http.fetchGet('/Client/Products?OnSale=1', params)
}

// 轮播图接口
export const getBanners = (params) => {
  return http.fetchGet('/Client/Banners', params)
}
// 获取分类
export const getCatergory = (params) => {
	return http.fetchGet('/Client/Categories', params)
}
//根据分类获取商品
export const getCatetgoryProducts = (params) => {
	return http.fetchGet('/Client/Products?OnSale=1', params)
}
//获取关于我们数据
export const getAboutUs = (params) => {
	return http.fetchGet('/client/AboutUs', params)
}